var base_url = 'http://localhost:8079';
var mqtt_api = 'mqtt/temperatureHumidity';

export default({
  getTempAndHumidity(deviceId){
    return new Promise((resolve, reject) => {
      let url= `${base_url}/${mqtt_api}/getTempAndHumidity/${deviceId}`;
      wx.request({
        url: url,
        method: 'GET',
        header: {
          "content-type": "application/x-www-form-urlencoded"
        },
        success: res => {
            resolve(res)
        }
      })
    })
  }
})